﻿#include "Leaf.h"
#include <QDebug>

Leaf::Leaf(QString name) : Component(name)
{

}

//void Leaf::Add(Component *c)
//{
//    qDebug() << "Cannot add a leaf";
//}

//void Leaf::Remove(Component *c)
//{
//    qDebug() << "Cannot remove a leaf";
//}

void Leaf::Add(const shared_ptr<Component> &c)
{
    qDebug() << "Cannot add a leaf";
}

void Leaf::Remove(const shared_ptr<Component> &c)
{
    qDebug() << "Cannot remove a leaf";
}

void Leaf::Display(int depth)
{
    qDebug() << QString(depth, '-') << QString(" %1").arg(m_name);
}
